﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Micro.Core.ApiConsumer.Context;

namespace Micro.Core.ApiConsumer.ParameterAttributes
{
    /// <summary>
    /// post请求时传递的消息体，json格式
    /// </summary>
    public class JsonBodyAttribute : ApiParameterAttribute
    {
        public override void Compose(HttpRequest request, ApiParameterDescriptor apiParameterDescriptor)
        {
            request.Data = apiParameterDescriptor.Value;
        }
    }
}
